import type{ FileItem } from '@/types/file'
//validateFileType函数需要进行文件类型验证修改
export function validateFileType(file: File,allowedTypes: string[]): boolean {
    return true
}
//formatFileSize函数需要进行文件大小设置修改
export function formatFileSize(bytes: number): string {
    return '0B'
}

export function  creatFileItem(file: File): FileItem {
    return {
        uid: Date.now().toString(),
        name: file.name,
        size:formatFileSize(file.size),
        raw:file,
        status:'待上传',
        percentage:-1
    }
}